import requests from "./requests";

//添加地址
export const addAddress = (data) => {
  return requests({
    method: "POST",
    url: "/api/addAddress",
    data: {
      ...data,
    },
  });
};
//获取收获地址
export const getAddress = (data) => {
    return requests({
      url: "/api/getAddress",

    });
  };
  //修改地址
export const updateAddress = (data) => {
    return requests({
      method: "POST",
      url: "/api/updateAddress",
      data: {
        ...data,
      },
    });
  };
//   删除收获地址
  export const deleteAddress = (id) => {
    return requests({
      method: "DELETE",
      url: "/api/deleteAddress",
      data: {
        id,
      },
    });
  };